//
//  ViewController.m
//  UITextField UITextView
//
//  Created by Justsoso on 16/2/19.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)backTap:(id)sender
{
    [self.view endEditing:YES];
}

- (IBAction)btnPressed:(UIButton *)sender
{
    if (self.nameTextField.text.length != 0 && self.ageTextField.text.length != 0 && self.classTextField.text.length != 0)
    {
        self.infoTextView.text = [NSString stringWithFormat:@"我叫%@,我%@岁,我是%@的学生",self.nameTextField.text,self.ageTextField.text,self.classTextField.text];
        
        self.nameTextField.text = @"";
        self.ageTextField.text = @"";
        self.classTextField.text = @"";
    }
}
@end
